package com.hongsheng.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hongsheng.pojo.Bill;
import com.hongsheng.pojo.vo.OrderReportVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;


/**
 * ClassName:BillService
 * Description:
 *
 * @Author: 李媛芝红豆西米露
 * @Create: 2023/8/10 - 18:49
 * @Version: 2023.1.2
 */

public interface BillService  extends IService<Bill> {
//    List<Bill> findAll();
    public List<Bill> selectAll(Integer currentPage,Integer pageSize);
    public Bill findBillById(int id);
    public List<Bill> findBillByType(String type);
    public List<Bill> findByAmount(@Param("amount1")int amount1, @Param("amount2")int amount2);
    public boolean insertBill(Bill bill);
    public boolean updateBill(Bill bill);
    public boolean deleteBill(int id);

    IPage<Bill> getPage(int currentPage, int size, Bill bill,int minAmount,int maxAmount);

    /**
     * 查询账单收入
     * @return
     */
    List<OrderReportVo> selectBillByMonth();

    /**
     * 查询账单支出
     * @return
     */

    List<OrderReportVo> selectBillByMoney();
}
